package springMVC.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class DataBd {

	//参数传递
	@RequestMapping(value="/say/{id}",method=RequestMethod.GET)
	public String sayInfo(@PathVariable int id,Model model) {
		System.out.println("id="+id);
		model.addAttribute("username","王多鱼");
		return "info";
	}
}
